﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CRM_SharePoint_Transports
{
    public class SPProperty
    {
        public SPProperty(string disp, string intName, string type, string binding)
        {
            DisplayName = disp;
            InternalName = intName;

            try
            {
                Type = (SPCopy.FieldType)System.Enum.Parse(typeof(SPCopy.FieldType), type);
            }
            catch
            {
                Type = SPCopy.FieldType.Text;
            }

            Binding = binding;
        }

        public SPProperty()
        {
            Type = SPCopy.FieldType.Text;
        }

        public string DisplayName, InternalName, Binding;
        public SPCopy.FieldType Type;
    }
}
